package sz.szsmk.citizencard.util;

import android.widget.ImageView;

import sz.szsmk.citizencard.R;

/**
 * Copyright (c)2018
 * author: zdh
 * created on: 2018/8/20 9:19
 * description:
 */
public class WeathUtils {


    public static void setWeath(ImageView imageView, String string) {
        if(StringUtils.isEmpty(string)){
            return;
        }
        if (string.equals("晴")) {
            imageView.setImageResource(R.drawable.qing);
        } else if (string.equals("多云")) {
            imageView.setImageResource(R.drawable.duoyun);
        } else if (string.equals("阴")) {
            imageView.setImageResource(R.drawable.yin);
        } else if (string.equals("阵雨")) {
            imageView.setImageResource(R.drawable.zhenyu);
        } else if (string.equals("雷阵雨")) {
            imageView.setImageResource(R.drawable.lzyu);
        } else if (string.equals("雷阵雨伴有冰雹")) {
            imageView.setImageResource(R.drawable.lzybybm);
        } else if (string.equals("雨夹雪")) {
            imageView.setImageResource(R.drawable.yjxue);
        } else if (string.equals("小雨")) {
            imageView.setImageResource(R.drawable.xiaoyu);
        } else if (string.equals("中雨")) {
            imageView.setImageResource(R.drawable.zhongyu);
        } else if (string.equals("大雨")) {
            imageView.setImageResource(R.drawable.dayu);
        } else if (string.equals("暴雨")) {
            imageView.setImageResource(R.drawable.baoyu);
        } else if (string.equals("大暴雨")) {
            imageView.setImageResource(R.drawable.dbyu);
        } else if (string.equals("特大暴雨")) {
            imageView.setImageResource(R.drawable.tdbyu);
        } else if (string.equals("阵雪")) {
            imageView.setImageResource(R.drawable.zhenxue);
        } else if (string.equals("小雪")) {
            imageView.setImageResource(R.drawable.xiaoxue);
        } else if (string.equals("中雪")) {
            imageView.setImageResource(R.drawable.zhongxue);
        } else if (string.equals("大雪")) {
            imageView.setImageResource(R.drawable.daxue);
        } else if (string.equals("暴雪")) {
            imageView.setImageResource(R.drawable.baoxue);
        } else if (string.equals("雾")) {
            imageView.setImageResource(R.drawable.wu);
        } else if (string.equals("冻雨")) {
            imageView.setImageResource(R.drawable.dongyu);
        } else if (string.equals("沙尘暴")) {
            imageView.setImageResource(R.drawable.scbao);
        } else if (string.equals("小到中雨")) {
            imageView.setImageResource(R.drawable.xdzy);
        } else if (string.equals("中到大雨")) {
            imageView.setImageResource(R.drawable.xdzy);
        } else if (string.equals("大到暴雪")) {
            imageView.setImageResource(R.drawable.ddbx);
        } else if (string.equals("浮沉")) {
            imageView.setImageResource(R.drawable.fuchen);
        } else if (string.equals("扬沙")) {
            imageView.setImageResource(R.drawable.yangsha);
        } else if (string.equals("强沙尘暴")) {
            imageView.setImageResource(R.drawable.qscb);
        } else if (string.equals("霾")) {
            imageView.setImageResource(R.drawable.mai);
        } else if (string.equals("无")) {
            imageView.setImageResource(R.drawable.noting);
        } else if (string.equals("浓雾")) {
            imageView.setImageResource(R.drawable.nongwu);
        } else if (string.equals("强浓雾")) {
            imageView.setImageResource(R.drawable.qnwu);
        } else if (string.equals("中度霾")) {
            imageView.setImageResource(R.drawable.zdmai);
        } else if (string.equals("重度霾")) {
            imageView.setImageResource(R.drawable.zdmai);
        } else if (string.equals("严重霾")) {
            imageView.setImageResource(R.drawable.yanzhongmai);
        } else if (string.equals("大雾")) {
            imageView.setImageResource(R.drawable.dawu);
        } else if (string.equals("特强浓雾")) {
            imageView.setImageResource(R.drawable.tqnwu);
        } else if (string.equals("雨")) {
            imageView.setImageResource(R.drawable.yu);
        } else if (string.equals("雪")) {
            imageView.setImageResource(R.drawable.xue);
        } else if (string.equals("多云")) {
            imageView.setImageResource(R.drawable.duoyun);
        }
    }

}
